/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sun.dtv.ui;

/**
 * This interface provides methods to set and retrieve parameters of an
 * animation effect. An animation is always stopped by default and must be
 * started by using the start method. Before changing the content of an
 * animation, the animation must be stopped if it is running at this point of
 * time. The default value for the animation position is always the first image,
 * the one with index 0. The default animation mode is REPEATING, the default
 * repetition mode is LOOP.
 * @author cbs
 */
public interface Animated {

    /**
     * Value for the animation mode.
     */
    static final int ALTERNATING =2;

    /**
     * Value for the repetition mode.
     */
    static final int LOOP=0;

    /**
     * Value for the animation mode.
     */
    static final int REPEATING=1;

    int getAnimationMode();
    int getDelay();

    /**
     * Obtains the current position the animation is at the point of time of the
     * method call. An animation can be considered as a row of images, this
     * method provides the index within this row.
     * @return - the current position of the image within the row of images
     * building this animation
     */
    int getPosition();
    
    int getRepetitionMode();
    boolean isRunning();
    void jumpTo(int position);
    void setAnimationMode(int mode);
    void setDelay(int n);
    void setRepetitionMode(int n);
    void start();
    void stop();
    
}